package com.woniuxy.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author: 马宇航
 * @Todo: TODO
 * @DateTime: 25/09/01/星期一 14:03
 * @Component: 成都蜗牛学苑
 **/
@Component
public class DeathQueueOutTimeNoPay {
    @RabbitListener(queues = "order.dlx.outtime.queue")
    public void outTimeNoPay(String order) {
        System.out.println("先去判断数据库订单的支付状态：如果是已支付,直接消费不处理即可"+order);
        System.out.println("先去判断数据库订单的支付状态：如果是未支付,直接修改数据库订单状态未未支付即可"+order);
    }
    @RabbitListener(queues = "delay_queue",ackMode = "AUTO")
    public void delayQueue(String order, Message message) {
        System.out.println(new Date()+"当前时间收到："+order);
        System.out.println("当前消息的头信息："+message.getMessageProperties());
    }
}
